package com.cloudlead.commonData.entity;

import com.cloudlead.common.lang.persistence.AbstractIdEntity;

import com.cloudlead.common.persistence.UpdateCheck;

import javax.validation.constraints.Size;
import java.lang.Boolean;
import com.cloudlead.common.lang.annotation.Label;
import java.lang.String;
import javax.validation.constraints.NotNull;
import java.lang.Integer;

/**
 * ERegion is a Querydsl bean type
 */
@Label("全国行政区划")
public class ERegion extends AbstractIdEntity<String> {

    private static final long serialVersionUID =13152282605820L;    
    @NotNull
    @Label("是否激活")
    private Boolean available;

    @NotNull
    @Label("代号")
    private Integer code;

    @NotNull(groups={UpdateCheck.class})
    @Label("编号")
    @Size(max=24)
    private String id;

    @NotNull
    @Label("级别")
    private Integer level;

    @NotNull
    @Label("名称")
    @Size(max=50)
    private String name;

    @Label("上级代号")
    private Integer parentCode;

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentCode() {
        return parentCode;
    }

    public void setParentCode(Integer parentCode) {
        this.parentCode = parentCode;
    }

    public String toString() {
         return String.format("ERegion { available : %s,code : %s,id : %s,level : %s,name : %s,parentCode : %s }",available,code,id,level,name,parentCode);
    }

}

